<?php 
	include("includes/config.php");
	include("includes/class/employed.class.php");
	include("includes/class/cliente_pila.class.php");
	
	$employed7 	= new Employed();
	$contract = new Cliente_pila();
	$code 		= $_POST['code'];
	//echo $employed7->listSalarioSelect($code);
	$arrayEps = $contract->listEpsSelect($code);
	$arrayCompany = $contract->listCompanySelect($code);
	$arrayArp = $contract->listArpSelect($code);
	$arrayAfp = $contract->listAfpSelect($code);
	$arrayParameter = $contract->listParameterSelect();
	$arrayFuneral = $contract->listFuneralSelect($code);
	$arrayParafiscal = $contract->listParafiscalSelect($code);
	$arrayEmployed = $contract->getEmployedSelect($code);
	
	echo "<salario>".$contract->listSalarioSelect($code)."</salario>";
	
	echo "<company_code>".$arrayCompany[0]."</company_code>";
	echo "<company>".$arrayCompany[1]."</company>";
	echo "<company_nit>".$arrayCompany[2]."</company_nit>";
	echo "<company_address>".$arrayCompany[3]."</company_address>";
	
	echo "<eps>".$arrayEps[0]."</eps>";
	echo "<porcEPS>".$arrayEps[1]."</porcEPS>";
	echo "<resultadoEps>".$arrayEps[1]*$contract->listSalarioSelect($code)."</resultadoEps>";
	
	echo "<arp>".$arrayArp[0]."</arp>";
	echo "<porcARP>".$arrayArp[1]."</porcARP>";
	echo "<resultadoArp>".$arrayArp[1]*$contract->listSalarioSelect($code)."</resultadoArp>";	
	
	echo "<afp>".$arrayAfp[0]."</afp>";
	echo "<porcAFP>".$arrayAfp[1]."</porcAFP>";
	echo "<resultadoAfp>".$arrayAfp[1]*$contract->listSalarioSelect($code)."</resultadoAfp>";
	
	echo "<funeral>".$arrayFuneral[1]."</funeral>";
	echo "<porcFuneral>".$arrayFuneral[1]."</porcFuneral>";
	
	echo "<poliza>".$arrayFuneral[2]."</poliza>";
	echo "<valuepoliza>".$arrayFuneral[3]."</valuepoliza>";
	echo "<seguro_vida>".$arrayFuneral[4]."</seguro_vida>";
	echo "<value_seguro_vida>".$arrayFuneral[5]."</value_seguro_vida>";
	echo "<otros>".$arrayFuneral[6]."</otros>";
	echo "<value_otros>".$arrayFuneral[7]."</value_otros>";
	
	echo "<admin>".$arrayFuneral[8]."</admin>";
	echo "<aporte_mutual>".$arrayFuneral[9]."</aporte_mutual>";

	echo "<iva>".$contract->listParameterSelect()."</iva>";
	echo "<result_admin>".$arrayFuneral[8]*$contract->listParameterSelect()."</result_admin>";

//	echo "<admin>".$arrayParameter[1]."</admin>";
	
	echo "<parafiscal>".$arrayParafiscal[0]."</parafiscal>";
	echo "<porcParafiscal>".$arrayParafiscal[1]."</porcParafiscal>";
	echo "<resultadoParafiscal>".$arrayParafiscal[1]*$contract->listSalarioSelect($code)."</resultadoParafiscal>";	

	echo "<employed_name>".$arrayEmployed[0]."</employed_name>";
	echo "<employed_lastname>".$arrayEmployed[1]."</employed_lastname>";
	echo "<employed_cedula>".$arrayEmployed[2]."</employed_cedula>";
	echo "<employed_address>".$arrayEmployed[3]."</employed_address>";
	echo "<employed_code>".$arrayEmployed[4]."</employed_code>";
?>